﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace ASPNETVN.PORTAL.Components.Share.Controls
{
    public partial class MessageBox : System.Web.UI.UserControl
    {
        public void ShowMessage(string caption, string message)
        {
            ShowMessage(caption, message, 0, 0);
        }

        public void ShowMessage(string caption, string message, int width, int height)
        {
            if (width == 0) width = 320;
            if (height == 0) height = 140;
            lblCaption.Text = caption;
            lblMessage.Text = message;
            this.pnlWindows.Attributes.Clear();
            this.pnlWindows.Attributes.Add("style", string.Format("display: none; padding: 0px; width: {0}px; height: {1}px", width, height));
            popup.Show();
        }

        protected void Page_Load(object sender, EventArgs e)
        {
         
        }
    }
}